﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WeeGODAL;
using Entity.Utity;

namespace WeeGOBLL
{
    public class MovComment
    {

        //显示评论
        //返回多个评论json类型
        /// <summary>
        /// 作者：张晨
        /// 状态：Finished
        /// 调用DLMovComment类里的ShowComment(int p_MovID)函数
        /// </summary>
        /// <param name="p_MovID"></param>
        /// <returns></returns>
        public static string ShowComment(string p_MovID)
        {
            DLMovComment dlMovComment = new DLMovComment();
            var data = dlMovComment.ShowComment(Int32.Parse( p_MovID));
            string comment = EntityToJSON.ToEntitiesJson(data,"comment");
            return comment;
        }

        
        //回复评论
        //返回json类型
        /// <summary>
        /// 作者：张晨
        /// 状态：Finished
        /// 调用DLMovComment类里的RelyComment(int p_UserID, int p_CommentID)函数
        /// </summary>
        /// <param name="p_UserID"></param>
        /// <param name="p_CommentID"></param>
        /// <returns></returns>
        public static string RelyComment(int p_UserID, int p_CommentID)
        {
            DLMovComment dlMovComment = new DLMovComment();
            var data = dlMovComment.RelyComment(p_UserID,p_CommentID);
            string rely = EntityToJSON.ToEntitiesJson(data,"rely");
            return rely;
        }

        //写评论
        //判断是否已经登录
        //评论的时候评分不能为0，评论不能为空
        //返回json类型
        public static string WriteComment(int p_UserID, int p_MovID, string p_Comment, string p_Score)
        {
            return "a";
        }

    }
}
